//package com.navinfo.opentsp.platform.computing.dto;
//
//
//import com.navinfo.opentsp.platform.computing.util.EntityConvert;
//import com.navinfo.opentsp.platform.location.protocol.common.LCPredictiveMaintenance;
//
//public class MaintenanceEvent5Dto {
//
//    private int alarmInformation;                  //报警信息
//    private double transmissionOilTemperature;           //变速箱油温
//
//    public int getAlarmInformation() {
//        return alarmInformation;
//    }
//
//    public void setAlarmInformation(int alarmInformation) {
//        this.alarmInformation = alarmInformation;
//    }
//
//    public double getTransmissionOilTemperature() {
//        return transmissionOilTemperature;
//    }
//
//    public void setTransmissionOilTemperature(double transmissionOilTemperature) {
//        this.transmissionOilTemperature = transmissionOilTemperature;
//    }
//
////    public static MaintenanceEvent5Dto parseProto(LCPredictiveMaintenance.MaintenanceEvent5 maintenanceEvent5){
////        MaintenanceEvent5Dto maintenanceEvent5Dto = new MaintenanceEvent5Dto();
////        maintenanceEvent5Dto.setAlarmInformation(maintenanceEvent5.getAlarmInformation());
////        maintenanceEvent5Dto.setTransmissionOilTemperature(maintenanceEvent5.getTransmissionOilTemperature());
////        return maintenanceEvent5Dto;
////    }
//
//    /**
//     * 解析成String拼接字符串
//     * @param maintenanceEvent5
//     * @return
//     */
//    public static String parseString(LCPredictiveMaintenance.MaintenanceEvent5 maintenanceEvent5){
//        return EntityConvert.convert(
//                maintenanceEvent5.getAlarmInformation(),
//                maintenanceEvent5.getTransmissionOilTemperature()
//        );
//    }
//
//    /**
//     * 反解析成PB对象
//     * @param str
//     * @return
//     */
//    public static LCPredictiveMaintenance.MaintenanceEvent5 parsePB(String str){
//        LCPredictiveMaintenance.MaintenanceEvent5.Builder builder = null;
//
//        try{
//            String[] revert = EntityConvert.revert(str);
//            if(null!=revert && revert.length>=2){
//                builder =LCPredictiveMaintenance.MaintenanceEvent5.newBuilder();
//                builder.setAlarmInformation(Integer.valueOf(revert[0]));
//                builder.setTransmissionOilTemperature(Double.valueOf(revert[1]));
//            }
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//
//        return builder==null? null : builder.build();
//    }
//
//}
